package io.gitee.yxsnake.embark.redis.configuration;

import io.gitee.yxsnake.embark.redis.service.RedisGeoService;
import io.gitee.yxsnake.embark.redis.service.SerialNumberGeneratorService;
import lombok.RequiredArgsConstructor;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.data.redis.core.RedisTemplate;

/**
 * @author snake
 * @description
 * @since 2024/10/27 18:46
 */
@Configuration
@RequiredArgsConstructor
public class CustomRedisConfig {

    private final RedisTemplate redisTemplate;

    @Bean
    public RedisGeoService redisGeoService(){
        return new RedisGeoService(redisTemplate);
    }

    @Bean
    public SerialNumberGeneratorService serialNumberGeneratorService(){
        return new SerialNumberGeneratorService(redisTemplate);
    }
}
